<%@page import="java.net.URLEncoder"%>
<%@page import="res.*"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.net.URLDecoder"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
request.setCharacterEncoding("UTF-8");
String query = request.getParameter("query");
String dQuery = URLEncoder.encode(query, "UTF-8");

ArrayList<String> list;
list=ImageList.laundryok(dQuery);
for(int i=2; i<list.size();i++){
	if(i%2==0){
		%>
		<%=list.get(i) %><br>
		<%
	}
	else {
		%><img src = "<%=list.get(i) %>"> <br><%
	}
}		
%>   
<%-- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

<%
	request.setCharacterEncoding("UTF-8");
	String query = request.getParameter("query");
	String sample = request.getParameter("sample");
	//한글의 경우 인코딩이 되서 
	String dQuery = URLDecoder.decode(query, "UTF-8");
	String dSample = URLDecoder.decode(sample, "UTF-8");
	%>
	쿼리 : <%=query %>, 샘플 : <%=sample %> <br>
	디코딩한 쿼리 : <%=dQuery %> 디코딩한 샘플:<%=dSample %>


</body>
 --%>